import vnode from './vnode'

export default function (sel, data, params) {
    //如果是字符串，就没有子元素
    if (typeof params == 'string') {
        return vnode(sel, data, undefined, params, undefined)
    } else if (Array.isArray(params)) {
        // console.log(params);
        let children = []
        for (let item of params) {
            children.push(item)
        }
        return vnode(sel, data, children, undefined, undefined)
    }
}